/* 收入和支出页面增强样式 */

/* 全局样式增强 */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.screen {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* 头部样式增强 */
.header {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 25px 20px;
    transition: all 0.3s ease;
}

.record-form-title {
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.date {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

/* 表单容器增强 */
.form-container {
    padding: 20px;
    animation: fadeIn 0.5s ease-out;
}

/* 收支切换标签增强 */
.record-type-tabs {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 3px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.record-type-tab {
    border-radius: 12px;
    padding: 12px 0;
    font-weight: 600;
    transition: all 0.3s ease;
}

.record-type-tab.expense {
    background: transparent;
    color: #718096;
}

.record-type-tab.expense:hover {
    background: rgba(229, 62, 62, 0.1);
    color: #e53e3e;
}

.record-type-tab.income {
    background: transparent;
    color: #718096;
}

.record-type-tab.income:hover {
    background: rgba(56, 161, 105, 0.1);
    color: #38a169;
}

.record-type-tab.active.expense {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.record-type-tab.active.income {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

/* 分类选择器增强 */
.category-selector {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    padding: 20px 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.category-item {
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.category-icon {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    font-size: 22px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.category-item.active .category-icon {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(56, 161, 105, 0.3);
}

.category-name {
    margin-top: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-item.active .category-name {
    color: #38a169;
    font-weight: 600;
}

/* 二级分类增强 */
.subcategory-selector {
    background: rgba(240, 255, 244, 0.9);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 25px 15px 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin: 10px 0 25px;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease-out;
}

.subcategory-title {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
    padding: 4px 15px;
    font-size: 13px;
    font-weight: 600;
}

.subcategory-icon {
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.subcategory-item:hover .subcategory-icon {
    transform: translateY(-2px);
}

.subcategory-item.active .subcategory-icon {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    box-shadow: 0 5px 15px rgba(56, 161, 105, 0.3);
}

.category-selected-info {
    background: linear-gradient(135deg, rgba(240, 255, 244, 0.9) 0%, rgba(226, 242, 228, 0.9) 100%);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-weight: 600;
    color: #38a169;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
}

/* 输入区域增强 */
.input-area {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(5px);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    margin-bottom: 25px;
}

.input-area:focus-within {
    box-shadow: 0 8px 30px rgba(56, 161, 105, 0.15);
    transform: translateY(-2px);
}

.description-input {
    font-size: 15px;
    color: #4a5568;
    transition: all 0.3s ease;
}

.description-input::placeholder {
    color: #a0aec0;
}

.amount-display {
    font-size: 20px;
    font-weight: 700;
    color: #38a169;
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 0 15px;
}

.receipt-upload {
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    color: #4a5568;
    font-size: 18px;
    transition: all 0.3s ease;
}

.receipt-upload:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    color: #38a169;
}

/* 计算器增强 */
.calculator {
    background: linear-gradient(135deg, rgba(240, 255, 244, 0.95) 0%, rgba(226, 242, 228, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
    padding: 25px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
}

.calculator-grid {
    gap: 12px;
}

.calculator-btn {
    height: 60px;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 600;
    background: white;
    color: #4a5568;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.calculator-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.calculator-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calculator-btn.btn-clicked {
    animation: buttonClick 0.15s ease-in-out;
}

@keyframes buttonClick {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.calculator-btn.operator {
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    color: #38a169;
    font-weight: 700;
}

.calculator-btn.date {
    background: linear-gradient(135deg, #e6fffa 0%, #d0f7ef 100%);
    color: #319795;
    font-weight: 600;
}

.calculator-btn.equals {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
}

.calculator-btn.equals:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.4);
}

.calculator-btn#cancel-btn {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(160, 174, 192, 0.3);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.form-group {
    animation: fadeIn 0.5s ease-out;
}

.form-group:nth-child(2) {
    animation-delay: 0.1s;
}

.form-group:nth-child(3) {
    animation-delay: 0.2s;
}

/* 支出页面特定样式 */
.expense-page .record-form-title {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.expense-page .record-type-tab.expense {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.expense-page .record-type-tab.income {
    background: transparent;
    color: #718096;
}

.expense-page .record-type-tab.income:hover {
    background: rgba(56, 161, 105, 0.1);
    color: #38a169;
}

.expense-page .category-item.active .category-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.3);
}

.expense-page .category-item.active .category-name {
    color: #e53e3e;
    font-weight: 600;
}

.expense-page .subcategory-selector {
    background: rgba(255, 245, 245, 0.9);
}

.expense-page .subcategory-title {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.3);
}

.expense-page .subcategory-item.active .subcategory-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

.expense-page .category-selected-info {
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.9) 0%, rgba(254, 226, 226, 0.9) 100%);
    color: #e53e3e;
}

.expense-page .amount-display {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.expense-page .receipt-upload:hover {
    color: #e53e3e;
}

.expense-page .calculator {
    background: linear-gradient(135deg, rgba(255, 245, 245, 0.95) 0%, rgba(254, 226, 226, 0.95) 100%);
}

.expense-page .calculator-btn.operator {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: #e53e3e;
}

.expense-page .calculator-btn.equals {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.expense-page .calculator-btn.equals:hover {
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

.expense-page .modal-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
}

.expense-page .btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #e53e3e 100%);
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.expense-page .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

/* 模态框增强 */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    color: white;
    border-bottom: none;
    padding: 20px;
}

.modal-title {
    font-weight: 700;
}

.modal-body {
    padding: 25px;
    font-size: 16px;
    color: #4a5568;
}

.modal-footer {
    border-top: none;
    padding: 15px 20px 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #51cf66 0%, #38a169 100%);
    border: none;
    border-radius: 12px;
    padding: 10px 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.4);
}